package com.vunguyen.model;
// Generated Dec 27, 2014 4:28:42 PM by Hibernate Tools 3.6.0


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Phieubaobu generated by hbm2java
 */
@Entity
@Table(name="phieubaobu"
    ,catalog="qlkhoacntt"
)
public class Phieubaobu  implements java.io.Serializable {


     private Integer idPhieuBaoBu;
     private Phieubaonghi phieubaonghi;
     private int siso;
     private Date ngayBu;
     private int xacNhan;

    public Phieubaobu() {
    }

    public Phieubaobu(Phieubaonghi phieubaonghi, int siso, Date ngayBu, int xacNhan) {
       this.phieubaonghi = phieubaonghi;
       this.siso = siso;
       this.ngayBu = ngayBu;
       this.xacNhan = xacNhan;
    }
   
     @GenericGenerator(name="generator", strategy="foreign", parameters=@Parameter(name="property", value="phieubaonghi"))@Id @GeneratedValue(generator="generator")

    
    @Column(name="idPhieuBaoBu", unique=true, nullable=false)
    public Integer getIdPhieuBaoBu() {
        return this.idPhieuBaoBu;
    }
    
    public void setIdPhieuBaoBu(Integer idPhieuBaoBu) {
        this.idPhieuBaoBu = idPhieuBaoBu;
    }

@OneToOne(fetch=FetchType.EAGER)@PrimaryKeyJoinColumn
    public Phieubaonghi getPhieubaonghi() {
        return this.phieubaonghi;
    }
    
    public void setPhieubaonghi(Phieubaonghi phieubaonghi) {
        this.phieubaonghi = phieubaonghi;
    }

    
    @Column(name="Siso", nullable=false)
    public int getSiso() {
        return this.siso;
    }
    
    public void setSiso(int siso) {
        this.siso = siso;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="NgayBu", nullable=false, length=10)
    public Date getNgayBu() {
        return this.ngayBu;
    }
    
    public void setNgayBu(Date ngayBu) {
        this.ngayBu = ngayBu;
    }

    
    @Column(name="XacNhan", nullable=false)
    public int getXacNhan() {
        return this.xacNhan;
    }
    
    public void setXacNhan(int xacNhan) {
        this.xacNhan = xacNhan;
    }




}


